package co.uniquindio.software.medisys.logica;

import java.util.Vector;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import co.uniquindio.software.medisys.entidades.Diagnostico;

public class GestorDiagnostico {

	EntityManagerFactory emf = Persistence
	.createEntityManagerFactory("MedisysPU");
	
	public Vector<Diagnostico> obtenerDiagnosticos() {
		EntityManager em = emf.createEntityManager();
		return (Vector<Diagnostico>) em.createQuery(
				"SELECT d FROM Diagnostico d")
				.getResultList();
	}
}
